/**
 * 
 */
package com.google.code.sip.ucenter.mail;

import java.util.Map;

import org.springframework.mail.SimpleMailMessage;

/**
 * @author Administrator
 * 
 */
public class MailServiceThread extends Thread {

	private DefaultMailService mailService;

	private SimpleMailMessage msg;
	Map<String, Object> map;
	private String templateName;

	public MailServiceThread(DefaultMailService mailService,
			String templateName, SimpleMailMessage msg, Map<String, Object> map) {
		this.mailService = mailService;
		this.templateName = templateName;
		this.msg = msg;
		this.map = map;
	}

	public void run() {
		mailService.send(msg, templateName, map);
	}

}
